﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>系统首页</title>
    <link href="css/Default.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="js/Common.js"></script>

    <script type="text/javascript" src="js/OpenWin.js"></script>

    <style type="text/css">
    body{margin:0px;padding:0px;}
    #head{height:110px;border:solid 1px gray;color:cornflowerblue;font-family:黑体;font-size:40px;}
    #lblUser{color:crimson;margin:0px 5px;}
    #lblDept{color:blue;margin:0px 5px;}
    #data{border:solid 1px gray;}
    #menu{float:left;height:24px;}
    #MenuData{float:left;}
    #info{float:left;line-height:22px;margin-left:10px;}
    #info a{cursor:pointer;}
    </style>
</head>
<body style="scroll: no;">
    <form id="form1" runat="server">
        <div id="head">
            LOGO</div>
        <div id="menu">
            <asp:Menu ID="MenuData" runat="server" Orientation="Horizontal">
            </asp:Menu>
            <div id="info">
                当前登录用户：<asp:Label ID="lblUser" runat="server" Text=""></asp:Label>
                所属部门：<asp:Label ID="lblDept" runat="server" Text=""></asp:Label>
                <a onclick="toEditPwd()">密码修改</a> <a onclick="relogin()">重新登录</a> <a onclick="exit()">
                    退出系统</a>
            </div>
        </div>
        <iframe id="data" name="data" frameborder="0" width="100%"></iframe>
    </form>

    <script type="text/javascript">
    function initFrame()
    {
        var h1 = window.top.document.getElementById("head").offsetHeight;
        var h2 = window.top.document.getElementById("menu").offsetHeight;
        var total = document.documentElement.clientHeight - h1 - h2 - 8;
    
        document.getElementById("data").style.height = total + "px";
    }
    function toEditPwd()
    {
        openwin("System/EditPwd.aspx",400,200,300);
    }
    function relogin()
    {
        location = "Default.aspx";
    }
    function exit()
    {
        if(confirm("确定要退出系统吗?"))
        {
            window.close();
        }
    }
    window.onload = initFrame;
    window.onresize = initFrame;
    </script>

</body>
</html>
